package com.corpgovernment.travelstandard.loader;

import com.corpgovernment.organization.entity.db.MbPostInfo;
import com.corpgovernment.organization.mapper.MbPostMapper;
import com.ctrip.corp.obt.generic.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * @author jhxue
 * @create 2022-05-13-12:17
 */
@Component
public class MbPostLoader {

	@Autowired
	private MbPostMapper mbPostMapper;

	public List<MbPostInfo> selectByOrgId(String orgId) {
		if (StringUtils.isBlank(orgId)) {
			return new ArrayList<>();
		}
		MbPostInfo mbPostInfo = new MbPostInfo();
		mbPostInfo.setOrgId(orgId);
		mbPostInfo.setIsDeleted(false);
		return mbPostMapper.select(mbPostInfo);
	}
}
